#include <stdio.h>
#include "mystring.h"

int main(int argc, char *argv[])
{
    char buf[100];
	if(argc != 3) {
		printf("需要输入字符串和要替换的字符串\n");
		return;
	}
    mystrcpy(buf, argv[1]);//argv[1]是原字符串，argv[2]是子字符串
    printf("buf=%s\n", buf);
	del_substr(buf, argv[2]);
    printf("buf=%s\n", buf);

	/*
    int ret;
    if((ret = mystrncmp(buf, "this Is a hot day.", 8)) == 0) {
        printf("Equal\n");
    }
    else {
        printf("return:%d\n", ret);
    }
    char *p;
    if((p=mystrstr(buf, "hoto")) != NULL ) {
        printf("find \"is\":%s\n", p);
    }
    //mystrcat(buf,  "The temperature is 42 degree\n");
    printf("buf=%s\n", buf);
    mystrcpy(buf, "   Hello world.   \n   ");
    trimstr(buf);
	*/
    printf("buf is:%s!\n", buf);
    return 0;
}

